package collection;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;

public class collectionAPI {

    public static void main(String arg[]) {
        HashMap mp = new HashMap();
        mp.put(1, "Atlanta");
        mp.put(2, "Albany");
        mp.put(3, "Denver");
        mp.put(5, "Detroit");
        mp.put(7, "San Francisco");
        mp.put(4, "New York");
        mp.put(6, "Orlando");

        List<String> cities = Arrays.asList("Atlanta", "Albany", "Denver", "Detroit", "San Francisco", "New York", "Orlando");
        System.out.println("Iterator.forEach");
        cities.forEach(x -> System.out.println(x));
        System.out.println();
    }
}
